//
//  NSString+STString.h
//  ShaBaoOnline
//
//  Created by huang yong on 16/7/11.
//  Copyright © 2016年 com.ShaBaoOnline.www. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface NSString (STString)
//得到后四位
+ (NSString *)cutOutLastFourStr:(NSString *)cardStr WithNum:(NSInteger)num;
//得到前一天:
+ (NSString *)getYesterdaywithStr:(NSString *)bill_timeStr;

+ (NSString *)getToday;
+ (NSString *)getdataString:(NSDate *) date11;
+ (BOOL)isPureInt:(NSString *)string;
+ (NSString *)getTodaySS;
- (NSString *)timeString;

- (BOOL)stringIsEmpty;

- (NSString *)MD5;

- (BOOL)validateNumberByASCII:(NSString *)string;
//邮箱判断
- (BOOL)isValidateEmail;
//数字和字母
- (BOOL)isValidateNumAndA;

-(BOOL)validateMobile;

-(BOOL)validateIdentityCard;

-(BOOL)validatePassword;

-(BOOL)validatePhoneCode;
- (NSDate *)dateByAddingDays:(NSInteger)days ;
////认证使用
- (NSString *)Base64EncodedStringFromString:(NSString *)string;

//身份证合法性判断最终版;
+ (BOOL)validateTruePeopleIDCode:(NSString *)identityCard;

//是否有中文
- (BOOL)validateChinese;

//判断数字
- (BOOL)validateNumberByRegExp;
//保存图片
+ (NSString *)saveImage:(UIImage *)tempImage WithName:(NSString *)imageName;
//去掉空格
- (NSString *)trimming;
+(NSString *)stringTOjson:(id)temps;
+ (NSString *) boolToString:(BOOL)bol;
+ (NSString *) string:(NSString *)oneStr divide:(NSString *)twoString;
+(NSString *)stringFromStatusId:(NSString *)statusId;
- (NSString *)cutString:(NSRange )ran;
+ (BOOL) StringToBool:(NSString *)bol;
- (NSString *)timeSaveMoneyString;
+ (BOOL)isSxistAtPath:(NSString *)filePath;
+ (NSString *)fullPathWithpath:(NSString *)filePath;

- (NSString *)timeMyMessageString;
- (NSString *)productReviewstimeString;
+(NSString *)timeInterval:(NSString *)lasttime;
- (NSString *)timeIntervalString;
- (NSString *)timeMycommunityStoreString ;
- (NSString *)sexChangeToMF;
+ (NSString *)dataStringFromDate:(NSInteger )date;
- (NSString *)mfChangeToChinaSex;
//时间转年龄
- (NSInteger)ageWithDateOfBirth:(NSString *)birthDate;
//汉语转字符串
+ (NSString *)firstCharactor:(NSString *)aString;
+ (long) compareDate1:(NSDate *)date1 withDate2:(NSDate *)date2 type:(int)type;
+ (NSDate *)getDateFromString:(NSString *)string;
- (NSDate *)stringToDate;
//解析
+(NSString *) jiexi:(NSString *)CS webaddress:(NSString *)webaddress;


- (NSString *)MD5Hash;

- (NSString *)QQTimeformat;

- (NSString *)weekString;// 1- 转星期一;
//判断数字和小数点;
- (BOOL)validateNumberAndDotByRegExp;
//护照验证
/**
 *  『正则表达式；推荐使用，不用循环遍历，控制更灵活』判断字符串内容是否是有效数字
 *
 *  @param string 需要验证的字符串
 *
 *  @return 判断护照验证
 */
- (BOOL)validatePassportNumberByRegExp;
@end
